Inside Macintosh: QuickTime Components

Previous | Chapter Top | Chapter Contents | Next

Derived Media Handler Components

Much of what a media handler component must do is common to all media handlers. Managing a connection with the appropriate data handler, retrieving movie data from media samples, and storing movie data into new samples account for a substantial part of every media handler's responsibilities. To make it easier for developers to create media handler components, Apple provides a base media handler component that performs most of the common duties of a media handler.

Apple's base media handler component eliminates much of the work you would have to do to create your own media handler component. The base media handler interacts with both the Movie Toolbox and the appropriate data handler, so that your media handler only has to deal with service requests, and you can ignore many of the housekeeping functions. It understands the format of Apple's media samples and sample descriptions, so that your media handler only has to worry about the actual media data. Finally, it provides basic services that your media handler can use to accommodate unusual display environments.

When you build your media handler component on top of the base media handler, your media handler is known as a derived media handler component . This terminology is borrowed from object-oriented development and refers to the fact that your media handler is based on, or derived from, the services provided by Apple's base media handler. Figure 10-2 shows the relationship between the base media handler, derived media handlers, the Movie Toolbox, and data handler components.

Figure 2 Relationship between the base media handler component and derived media handlers

You should consider deriving your media handler from Apple's base media handler component if your media requires low to moderate data throughput. Apple's base media handler can support data rates up to 32 kilobits per second. This rate is adequate for such data types as text, sound effects, animation, annotations, or MIDI (Musical Instrument Digital Interface) sound data. However, Apple's base media handler is not appropriate for CD-quality sound, which may require data rates of up to 176 kilobits per second.


© 1997 Apple Computer, Inc.

Previous | Chapter Top | Chapter Contents | Next